<template>
	<view class="music-header" :style="{color:color}">
		<view  class="music-header-icon" v-if="icon">
			<text class="iconfont icon-zuojiantou" @tap="handleToBack"></text>|
			<text class="iconfont icon-shouye" @tap="handleToHome"></text>
		</view>
		<view class="title">
			{{title}}
		</view>
	</view>
</template>

<script>
	export default {
		name:"MusicHeader",
		props:["title","icon",'color'],
		data() {
			return {
				
			};
		},
		methods:{
			handleToBack(){
				uni.navigateBack()
			},
			handleToHome(){
				uni.navigateTo({
					url:"../../pages/index/index"
				})
			}
		}
	}
</script>

<style scoped>
	.music-header{
		width: 100%;
		height: 225rpx;
		color: #333333;
		font-size: 32rpx;
		position: relative;
		display: flex;
		align-items: center;
	}
	.title{
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}
	.music-header-icon{
		margin-left: 10px;
		width: 190rpx;
		height: 60rpx;
		color: #FFFFFF;
		line-height: 60rpx;
		background-color:rgba(0,0,0,0.4) ;
		border-radius: 60rpx;
		 display: flex;
		justify-content: space-evenly;
		
	}
</style>
